package com.woniuxy.common.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class ResultMsg implements Serializable {
    private Integer code;		//状态码
    private String message;	//提示信息
    private Object data;			//返回的数据

    public ResultMsg(boolean state) {
        super();
        if (state) {
            this.code = 200;
            this.message = "操作成功";
        }else {
            this.code = 500;
            this.message = "操作失败";
        }
    }
}
